{{include file="public/header" /}}
<style>
    *{ margin:0; padding:0; list-style:none; text-decoration:none;}
    .wraper{ width:100%; padding-bottom:20px }
    .nav{ position:relative; width:100%; height:40px; background:#eee; overflow:hidden}
    .nav-item{ position:relative; float:left; width:160px; height:40px; line-height:40px; text-align:center; font-size:14px; z-index:1}
    .nav-item a{ display:block; height:40px; color:#111;}
    .nav-item a:hover{ color:#fff}
    .move-bg{ display:none;position:absolute;left:0;top:0; width:160px; height:40px; background:#4386fb; z-index:0}
    .bg a{background:#4386fb;color:#fff;}
</style>


<!-- right content start  -->
<div class="content-right">
    <div class="content">
        <!-- form start -->
        <form  class="am-form  form-search" method="post" action="{{:MyUrl('admin/goods/blacklist')}}" request-type="form">
            <div class="thin">
                <div class="am-input-group am-input-group-sm am-fl so">
                    <input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="标题/作者/isbn" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
                    <span class="am-input-group-btn">
                        <button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
                    </span>
                </div>
                
            </div>
            
        </form>
        <!-- form end -->

        <!-- operation start -->
        <div class="am-g m-t-15">
            <a href="{{:MyUrl('admin/goods/save_blacklistInfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> 新增黑名单</a>
           
        </div>
           <div class="am-g m-t-15">
         <form class="am-form form-validation view-save" action="{{:MyUrl('admin/Goods/execlUpload')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/Goods/blacklist')}}" enctype="multipart/form-data">
            <div class="am-form-group am-form-file">
                <button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
                <i class="am-icon-cloud-upload"></i> 选择文件</button>
                <input type="file" name="file" class="file-event" data-tips-tag="#form-file-tips" data-validation-message="请选择需要上传的文件" accept=".xls" multiple required />
                <span class="tips fs-12">上传一个execl文件</span>   <button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm" data-am-loading="{loadingText:'导入中...'}">上传</button>
                <div id="form-file-tips" class="am-margin-top-xs"></div>
                
            </div>
          
        </form>
           </div>   
        <!-- operation end -->

        <!-- list start -->
        <table class="am-table am-table-striped am-table-hover am-text-middle m-t-10 goods-list">
            <thead>
                <tr>
                    <th>编号</th>
                    <th>标题名称</th>

                    <th class="am-hide-sm-only">作者</th>
                    <th class="am-hide-sm-only">出版社</th>
                    <th class="am-hide-sm-only">出版时间</th>


                    <th class="am-hide-sm-only">isbn</th>
                    <th class="am-hide-sm-only">操作员</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{if !empty($data_list)}}
                {{foreach $data_list as $v}}
                <tr id="data-list">
                    <td>{{$v.id}}</td>
                    <td>
                        <img src="{{$v['images']}}" class="am-img-thumbnail am-radius goods-images am-hide-sm-only" />
                        {{$v.title}} 
                    </td>
                    <td class="am-hide-sm-only">{{$v.author}}</td>
                    <td class="am-hide-sm-only">{{$v.press}}</td>
                    <td class="am-hide-sm-only">{{$v.pubdate}}</td>
                    <td class="am-hide-sm-only">{{$v.isbn}}</td>
                    <td class="am-hide-sm-only">{{$v.username}}</td>                    
                    <td class="view-operation">
                        <a href="{{:MyUrl('admin/goods/save_blacklistInfo', array_merge($params, ['id'=>$v['id']]))}}">
                            <button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
                        </a>
                        <button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('admin/goods/blacklistDelete')}}" data-id="{{$v.id}}"> 删除</button>
  
                   {{/foreach}}
                 {{/if}}
            </tbody>
        </table>
        {{if empty($data_list)}}
        <div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
        {{/if}}
        <!-- list end -->

        <!-- page start -->
        {{if !empty($data_list)}}
        {{$page_html|raw}}
        {{/if}}
        <!-- page end -->
    </div>
</div>
<!-- right content end  -->

<!-- footer start -->
{{include file="public/footer" /}}
 